window.onload = ()=> {
    const camVedio = document.querySelector('#video');
    // 获取摄像头视频流
    async function getCameraStream() {
        let cameraStream = await navigator.mediaDevices.getUserMedia({
            audio: false,
            video: {
                width: 1920,
                height: 1080,
                frameRate: 30
            }
        })
        return cameraStream
    }
    getCameraStream().then((stream)=> {
        camVedio.srcObject = stream
        camVedio.play()
    })
}